<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自定义表格布局</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            line-height: 1.5;
            color: #333;
            background-color: #f8f9fa;
            margin: 0;
            padding: 2rem;
        }

        .table-container {
            max-width: 1200px;
            margin: 0 auto;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            overflow: hidden;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }

        /* 设置列宽比例为 2:1:2:10:4:4 */
        colgroup col:nth-child(1) { width: 11%; }
        colgroup col:nth-child(2) { width: 3%; }
        colgroup col:nth-child(3) { width: 11%; }
        colgroup col:nth-child(4) { width: 50%; }
        colgroup col:nth-child(5) { width: 15%; }
        colgroup col:nth-child(6) { width: 10%; }

        /* 隐藏表头 */
        thead {
            display: none;
        }

        tbody tr {
            border-bottom: 1px solid #e2e8f0;
        }

        tbody tr:last-child {
            border-bottom: none;
        }

        /* tbody tr:hover {
            background-color: #edf2f7;
            transition: background-color 0.2s ease;
        } */

        td {
            padding: 1rem;
            font-size: 0.9rem;
        }

       .center{
            text-align: center;
       }

        /* 状态标签样式 */
        .status {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }

        .status.active {
            background-color: #c6f6d5;
            color: #22543d;
        }

        .status.inactive {
            background-color: #fed7d7;
            color: #9b2c2c;

        }
     
    </style>
</head>
<body>
    <div class="table-container">
        <table>
            <colgroup>
                <col><col><col><col><col><col>
            </colgroup>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>状态</th>
                    <th>类型</th>
                    <th>描述</th>
                    <th>负责人</th>
                    <th>日期</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>#1001</td>
                    <td><span class="status active">活跃</span></td>
                    <td>项目</td>
                    <td>前端界面优化与重构, 提升用户体验和页面性能</td>
                    <td>张明</td>
                    <td>2023-06-15</td>
                </tr>
                <tr>
                    <td>#1002</td>
                    <td><span class="status inactive">已暂停</span></td>
                    <td>任务</td>
                    <td>集成第三方支付网关, 支持多种支付方式</td>
                    <td>李华</td>
                    <td>2023-06-10</td>
                </tr>
                <tr>
                    <td>#1003</td>
                    <td><span class="status active">活跃</span></td>
                    <td>问题</td>
                    <td>移动端页面在iOS设备上显示异常, 需要修复布局问题</td>
                    <td>王芳</td>
                    <td>2023-06-05</td>
                </tr>
                <tr>
                    <td>#1004</td>
                    <td><span class="status active">活跃</span></td>
                    <td>功能</td>
                    <td>开发数据可视化仪表盘, 展示关键业务指标</td>
                    <td>赵强</td>
                    <td>2023-06-01</td>
                </tr>
                <tr>
                    <td>#1005</td>
                    <td><span class="status inactive">已完成</span></td>
                    <td>任务</td>
                    <td>优化数据库查询性能, 减少页面加载时间</td>
                    <td>陈明</td>
                    <td>2023-05-28</td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>